#include "Box.h"
#include <iostream>

using namespace std;


Box::Box(double l):Box{l,l,l}
{
    objectCount++ ;
    length = l ;
}

Box::Box(double l,double w,double h):length(l),width(w),height(h)
{
    cout<<"Box constructor called2."<<endl;

}
Box::~Box()
{
    cout<<" objectCount--."<<endl;
    objectCount-- ;
}
void Box::setLength(double len)
{
    this->length = len;
}

double Box::getLength() const
{
    return this->length;
}
double Box::volume()
{
    return length * width * height ;
}

bool Box::explicitTest(Box other)
{
    return  volume() > other.volume();
}
bool Box::operator==( Box& aBox)
{
    return volume() == aBox.volume();
};
